SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].[usp_FacultyActivities_Search]
    (
		@param_JOL_FacultyActivities_Faculty NVarChar(50),
		@param_JOL_FacultyActivities_Title NVarChar(100),
		@param_JOL_FacultyActivities_Type NVarChar(50),
		@param_JOL_FacultyActivities_VerifyState NVarChar(10)
    )
AS
    SELECT  JOL_FacultyActivities_ID ,
			JOL_FacultyActivities_Faculty ,
			JOL_FacultyActivities_FacultyID ,
			JOL_FacultyActivities_Type ,
			JOL_FacultyActivities_Title ,
			JOL_FacultyActivities_Site ,
			JOL_FacultyActivities_StartTime ,
			JOL_FacultyActivities_VerifyState ,
			JOL_FacultyActivities_AddTime ,
			JOL_FacultyActivities_VerifyTime ,
			JOL_FacultyActivities_Comment
    FROM    dbo.JOL_FacultyActivities
    WHERE	JOL_FacultyActivities_Faculty LIKE '%' + @param_JOL_FacultyActivities_Faculty  + '%'
			AND JOL_FacultyActivities_Title LIKE '%' + @param_JOL_FacultyActivities_Title + '%' 
			AND JOL_FacultyActivities_Type LIKE '%' + @param_JOL_FacultyActivities_Type  + '%'
			AND JOL_FacultyActivities_VerifyState LIKE '%' + @param_JOL_FacultyActivities_VerifyState + '%'
    ORDER BY JOL_FacultyActivities_AddTime DESC
    
    

GO
